﻿/***********************************************************************
 * <copyright file="DBOptionEntity.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   ThangND
 * Email:    thangnd@buca.vn
 * Website:
 * Create Date: 07 March 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/


using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessDictionary
{

    /// <summary>
    /// 
    /// </summary>
    public class DbOption : BusinessObject 
    {

/// <summary>
/// Initializes a new instance of the <see cref="DbOption"/> class.
/// </summary>
        public DbOption()
        {
            //validateId
            AddRule(new ValidateId("OptionId"));
            //validateRequired
        }

        /// <summary>
        /// </summary>
        /// <param name="optionId"></param>
        /// <param name="unitId"></param>
        /// <param name="code"></param>
        /// <param name="value"></param>
        /// <param name="description"></param>
        /// <param name="valueType"></param>
        /// <param name="isSystem"></param>
        public DbOption(int optionId, long unitId, string code, string value, string description,
                        int valueType, bool isSystem)
            : this()
        {
            OptionId = optionId;
            UnitId = unitId;
            Code = code;
            Value = value;
            ValueType = valueType;
            Description = description;
            IsSystem = isSystem;
        }

        /// <summary>
        /// </summary>
        public int OptionId { get; set; }

        /// <summary>
        /// </summary>
        public long UnitId { get; set; }

        /// <summary>
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// </summary>
        public int ValueType { get; set; }

        /// <summary>
        /// </summary>
        public bool IsSystem { get; set; }
    }
}